<template>
  <div>
    <h2>Home</h2>
    <button @click="toIndex">去index</button>
  </div>
</template>

<script>
export default {
  methods: {
    toIndex() {
      this.$router.push("/");
    },
  },
};
</script>
